package com.yu.crm.controller;


import com.yu.crm.domain.pojo.BimDictInfo;
import com.yu.crm.service.impl.BimDictInfoService;
import com.yxzz.common.helper.valid.ValidatorHelpers;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 数据字典表 前端控制器
 * </p>
 *
 * @author pan
 * @since 2020-07-13
 */
@Api(tags = "字典表信息接口")
@RestController
@RequestMapping("/bim-dict-info")
public class BimDictInfoController {

    @Autowired
    private BimDictInfoService dictInfoService;
    //添加字典表信息
    @ApiOperation("添加字典表信息")
    @PostMapping("add")
    public void add(BimDictInfo bimDictInfo){
        dictInfoService.addDictInfo(bimDictInfo);
    }

    @ApiOperation("字典信息列表")
    @GetMapping("list")
    public List<BimDictInfo> list(){
      return  dictInfoService.list();
    }
}

